package com.lixinxin.benbenlove.provider

import android.annotation.SuppressLint
import android.content.ContentProvider
import android.content.ContentResolver
import android.content.ContentValues
import android.database.Cursor
import android.database.MatrixCursor
import android.net.Uri
import android.util.Log

/** 共享数据 */
class ShareContentProvider : ContentProvider() {

    override fun delete(uri: Uri, selection: String?, selectionArgs: Array<String>?): Int {
        return 0
    }

    override fun getType(uri: Uri): String {
        return "share"

    }

    override fun insert(uri: Uri, values: ContentValues?): Uri? {

        return Uri.parse("")
    }

    override fun onCreate(): Boolean {

        return true
    }

    override fun query(
        uri: Uri, projection: Array<String>?, selection: String?,
        selectionArgs: Array<String>?, sortOrder: String?
    ): Cursor {
        val cursor =
            MatrixCursor(arrayOf("share"))
        cursor.addRow(arrayOf("leeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"))
        return cursor
    }

    override fun update(
        uri: Uri, values: ContentValues?, selection: String?,
        selectionArgs: Array<String>?
    ): Int {
        return 0
    }


}